import request from './request';

// =========ip查城市名
export const getipcityname = () => {
  return request({
    url: '/ip?key=9cdab02edda5ca5c2145556526fe1b74',
    method: 'get',
  });
};

// ==========城市名查adcode
export const getcityadcode = (cityname) => {
  return request({
    url: `/geocode/geo?address=${cityname}&key=9cdab02edda5ca5c2145556526fe1b74`,
    method: 'get',
  });
};

//============ adcode查天气
export const getadcodeweather = (adcode) => {
  return request({
    url: `weather/weatherInfo?city=${adcode}&key=9cdab02edda5ca5c2145556526fe1b74&extensions=all`,
    method: 'get',
  });
};
